import java.io.IOException;
import java.util.InputMismatchException;
import java.util.Scanner;



/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-21
 * Time: 20:37
 */
class TestFinally {

}
public class Test7 {
    public static int getData() {
        Scanner sc = null;
        try {
            sc = new Scanner(System.in);
            int data = sc.nextInt();
            return data;
        } catch(InputMismatchException e) {
            e.printStackTrace();
        } finally {
            System.out.println("finally中代码");
        }
        System.out.println("try catch后的代码");
        if(null != sc) {
            sc.close();
        }
        return 0;
    }
    public static void main(String[] args) {
        int data = getData();
        System.out.println(data);
    }
}
